@extends('back.index')
@section('title','作家咨询管理-后台管理系统')
@section('mian')
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <h2 class="sub-header power_mian">书籍管理</h2>
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <th>书名</th>
                    <th>封面</th>
                    <th>类型</th>
                    <th>作者</th>
                    <th>添加时间</th>
                    <th>更新时间</th>
                    <th>点击量</th>
                    <th>是否收费</th>
                    <th>操作</th>
                </tr>
                @if(count($List))
                @foreach($List as $k)
                <tr>
                    <td>{{$k->bookname}}</td>
                    <td>
                        <img src="{{asset('/image/books/'.$k->bookicon)}}" alt="" style="width:100px;height:100px">
                    </td>
                    <td>
                        @if($k->cid == 1)
                           玄幻
                            @elseif($k->cid == 2)
                           科幻
                            @elseif($k->cid == 3)
                           都市
                            @elseif($k->cid == 4)
                           军事
                            @elseif($k->cid == 5)
                           末日
                            @elseif($k->cid == 6)
                            武侠
                            @elseif($k->cid == 7)
                            爱情
                        @endif
                    </td>
                    <td>{{$k->writername}}</td>
                    <td>{{date('Y-m-d H:i:s',$k->addtime)}}</td>
                    <td>
                        @if($k->uptime)
                            {{date('Y-m-d H:i:s',$k->uptime)}}
                            @else
                        暂无更新
                            @endif
                    </td>
                    <td>
                       {{$k->scan}}
                    </td>
                    <td>
                        @if($k->freezhong == 0)
                           收费
                        @elseif($k->freezhong == 1)
                           免费
                        @endif
                    </td>
                    <td>
                        <a href="{{url('back/writer/book_txt/'.$k->id)}}" class="btn btn-info">查看章节</a>
                        &nbsp;
                        <a href="{{url('back/writer/books/desc')}}" class="btn btn-info">按更新排序</a>
                        &nbsp;
                        <a href="{{url('back/writer/books/drop/'.$k->id)}}" class="btn btn-info">删除</a>
                    </td>
                </tr>
                @endforeach
                    @else
                <tr>
                    <td colspan="8" style="text-align: center;border-bottom: 1px solid #DDD"><h2>暂无数据</h2></td>
                </tr>
                    @endif
            </table>
            {{$List->links()}}
        </div>
    </div>
@endsection
